home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-01-24 | 8.2 KB | 380 lines | [TEXT/MPS ] |
- ;
- ; File: GXEnvironment.a
- ;
- ; Contains: QuickDraw GX environment constants and interfaces
- ;
- ; Version: Technology: Quickdraw GX 1.1
- ; Package: Universal Interfaces 2.2 in “MPW” on ETO #20
- ;
- ; Copyright: © 1984-1995 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- ; stack. Include the file and version information (from above)
- ; in the problem description and send to:
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__GXENVIRONMENT__') = 'UNDEFINED' THEN
- __GXENVIRONMENT__ SET 1
-
-
- IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
- include 'ConditionalMacros.a'
- ENDIF
-
- IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
- include 'MixedMode.a'
- ENDIF
- ; include 'Types.a' ;
-
- IF &TYPE('__WINDOWS__') = 'UNDEFINED' THEN
- include 'Windows.a'
- ENDIF
- ; include 'Memory.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'Events.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Controls.a' ;
- ; include 'Menus.a' ;
-
- IF &TYPE('__GXTYPES__') = 'UNDEFINED' THEN
- include 'GXTypes.a'
- ENDIF
- ; include 'GXMath.a' ;
- ; include 'FixMath.a' ;
-
- IF &TYPE('__CMAPPLICATION__') = 'UNDEFINED' THEN
- include 'CMApplication.a'
- ENDIF
- ; include 'Files.a' ;
- ; include 'Finder.a' ;
- ; include 'Printing.a' ;
- ; include 'Errors.a' ;
- ; include 'Dialogs.a' ;
- ; include 'TextEdit.a' ;
- ; include 'CMICCProfile.a' ;
- graphicsMacintoshIncludes: SET 1
-
- defaultPollingHandlerFlags EQU $00
- okToSwitchDuringPollFlag EQU $00
- dontSwitchDuringPollFlag EQU $01
-
- ; typedef long gxPollingHandlerFlags
- ;
- ; gxPollingHandlerUPP GXGetGraphicsPollingHandler(long *reference)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetGraphicsPollingHandler
- move.w #$245,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetGraphicsPollingHandler
- ENDIF
-
- ;
- ; void GXSetGraphicsPollingHandler(gxPollingHandlerUPP handler, long reference)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXSetGraphicsPollingHandler
- move.w #$246,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXSetGraphicsPollingHandler
- ENDIF
-
- graphicsToolboxIncludes: SET 1
- ; QD to QD GX Translator typedefs
-
- gxDefaultOptionsTranslation EQU $0000
- gxOptimizedTranslation EQU $0001
- gxReplaceLineWidthTranslation EQU $0002
- gxSimpleScalingTranslation EQU $0004
- gxSimpleGeometryTranslation EQU $0008 ; implies simple scaling
- gxSimpleLinesTranslation EQU $000C ; implies simple geometry & scaling
- gxLayoutTextTranslation EQU $0010 ; turn on gxLine layout (normally off)
- gxRasterTargetTranslation EQU $0020
- gxPostScriptTargetTranslation EQU $0040
- gxVectorTargetTranslation EQU $0080
-
- ; typedef long gxTranslationOption
-
- gxContainsFormsBegin EQU $0001
- gxContainsFormsEnd EQU $0002
- gxContainsPostScript EQU $0004
- gxContainsEmptyPostScript EQU $0008
-
- ; typedef long gxTranslationStatistic
-
- gxQuickDrawPictTag EQU 'pict'
-
- gxQuickDrawPict RECORD 0
- ; translator inputs
- options ds.l 1 ; offset: $0 (0)
- srcRect ds Rect ; offset: $4 (4)
- styleStretch ds Point ; offset: $C (12)
- ; size of quickdraw picture data
- dataLength ds.l 1 ; offset: $10 (16)
- ; file alias
- alias ds gxBitmapDataSourceAlias ; offset: $14 (20)
- sizeof EQU * ; size: $1E (30)
- ENDR
-
- ; typedef struct gxQuickDrawPict gxQuickDrawPict
- ; WindowRecord utilities
- ;
- ; gxViewPort GXNewWindowViewPort(WindowPtr qdWindow)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXNewWindowViewPort
- move.w #$236,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXNewWindowViewPort
- ENDIF
-
- ;
- ; gxViewPort GXGetWindowViewPort(WindowPtr qdWindow)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetWindowViewPort
- move.w #$237,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetWindowViewPort
- ENDIF
-
- ;
- ; WindowPtr GXGetViewPortWindow(gxViewPort portOrder)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetViewPortWindow
- move.w #$238,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetViewPortWindow
- ENDIF
-
- ; GDevice utilities
- ;
- ; GDHandle GXGetViewDeviceGDevice(gxViewDevice theDevice)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetViewDeviceGDevice
- move.w #$239,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetViewDeviceGDevice
- ENDIF
-
- ;
- ; gxViewDevice GXGetGDeviceViewDevice(GDHandle qdGDevice)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetGDeviceViewDevice
- move.w #$23a,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetGDeviceViewDevice
- ENDIF
-
- ; gxPoint utilities
- ;
- ; void GXConvertQDPoint(const Point *shortPt, gxViewPort portOrder, gxPoint *fixedPt)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXConvertQDPoint
- move.w #$23b,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXConvertQDPoint
- ENDIF
-
- ; printing utilities typedef
- ; typedef gxShapeSpoolProcPtr gxShapeSpoolFunction
- ; typedef gxUserViewPortFilterProcPtr gxUserViewPortFilter
- ; typedef gxConvertQDFontProcPtr gxConvertQDFontFunction
- ; mouse utilities
- ; return mouse location in fixed-gxPoint global space
- ;
- ; void GXGetGlobalMouse(gxPoint *globalPt)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetGlobalMouse
- move.w #$23c,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetGlobalMouse
- ENDIF
-
- ; return fixed-gxPoint local mouse (gxViewPort == 0 --> default)
- ;
- ; void GXGetViewPortMouse(gxViewPort portOrder, gxPoint *localPt)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetViewPortMouse
- move.w #$23d,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetViewPortMouse
- ENDIF
-
- ; printing utilities
- ;
- ; gxUserViewPortFilter GXGetViewPortFilter(gxViewPort portOrder, long *refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetViewPortFilter
- move.w #$25e,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetViewPortFilter
- ENDIF
-
- ;
- ; void GXSetViewPortFilter(gxViewPort portOrder, gxUserViewPortFilter filter, long refCon)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXSetViewPortFilter
- move.w #$23e,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXSetViewPortFilter
- ENDIF
-
- ; QD to QD GX Translator functions
- ;
- ; void GXInstallQDTranslator(GrafPtr port, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStrech, gxShapeSpoolUPP userFunction, void *reference)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXInstallQDTranslator
- move.w #$23f,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXInstallQDTranslator
- ENDIF
-
- ;
- ; gxTranslationStatistic GXRemoveQDTranslator(GrafPtr port, gxTranslationStatistic *statistic)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXRemoveQDTranslator
- move.w #$240,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXRemoveQDTranslator
- ENDIF
-
- ;
- ; gxShape GXConvertPICTToShape(PicHandle pict, gxTranslationOption options, const Rect *srcRect, const Rect *dstRect, Point styleStretch, gxShape destination, gxTranslationStatistic *stats)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXConvertPICTToShape
- move.w #$241,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXConvertPICTToShape
- ENDIF
-
- ; Find the best GX style given a QD font and face. Called by the QD->GX translator
- ;
- ; long GXConvertQDFont(gxStyle theStyle, long txFont, long txFace)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXConvertQDFont
- move.w #$242,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXConvertQDFont
- ENDIF
-
- ;
- ; gxConvertQDFontUPP GXGetConvertQDFont(void)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetConvertQDFont
- move.w #$243,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetConvertQDFont
- ENDIF
-
- ;
- ; void GXSetConvertQDFont(gxConvertQDFontUPP userFunction)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXSetConvertQDFont
- move.w #$244,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXSetConvertQDFont
- ENDIF
-
- ; ColorSync 2.0 interface related routines
- ;
- ; void GXSetColorProfileReference(gxColorProfile profile, CMProfileRef reference)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXSetColorProfileReference
- move.w #$282,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXSetColorProfileReference
- ENDIF
-
- ;
- ; CMProfileRef GXGetColorProfileReference(gxColorProfile profile)
- ;
- IF ¬ GENERATINGCFM THEN
- Macro
- _GXGetColorProfileReference
- move.w #$283,d0
- dc.w $A832
- EndM
- ELSE
- IMPORT_CFM_FUNCTION GXGetColorProfileReference
- ENDIF
-
- ENDIF ; __GXENVIRONMENT__
-